import { STUDY_RECORD } from "@/api/config/servicePort";
import http from "@/api";

/**
 * @name 课程模块
 */
export interface ResPage<T> {
  list: T[];
  pageNum: number;
  pageSize: number;
  total: number;
}

export const addStudyRecordApi = async (params?: any) => {
  return http.post<any>(STUDY_RECORD + `/add`, params);
};
export const updateStudyRecordApi = async (params?: any) => {
  return http.post<any>(STUDY_RECORD + `/update`, params);
};
export const listStudyRecordApi = async (params?: any) => {
  return http.post<any>(STUDY_RECORD + `/list`, params);
};

export const getStudyRecordQuestionListApi = async (params?: any) => {
  return http.post(STUDY_RECORD + `/question_list`, params);
};

export const getStudyRecordInfoApi = async (params?: any) => {
  return http.post<any>(STUDY_RECORD + `/info`, params);
};

export const deleteStudyRecordApi = async (params?: any) => {
  return http.post<any>(STUDY_RECORD + `/delete`, params);
};
